﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace SuperQuery
{
    /// <summary>
    /// Interaction logic for About.xaml
    /// </summary>
    public partial class About : Window, Views.IView
    {
        /// <summary>
        /// Initialise the About diaglog
        /// </summary>
        public About()
        {
            InitializeComponent();

            // Get and set the version information
            System.Reflection.Assembly superQueryAssem = System.Reflection.Assembly.GetExecutingAssembly();
            Version ver = superQueryAssem.GetName().Version;
            lblVersion.Content = string.Format("Version {0}.{1}.{2} (Build: {3})", ver.Major, ver.Minor, ver.Revision, ver.Build);
        }

        /// <summary>
        /// Close the About dialog
        /// </summary>
        /// <param name="sender">Who raised the event</param>
        /// <param name="e">Details about the event</param>
        private void btnClose_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }
    }
}
